home *** CD-ROM | disk | FTP | other *** search
/ The Netter Presenter: Ur…ion in Overactive Bladder / The Netter Presenter: Urinary System - Structure & Function in Overactive Bladder.iso / mac / UrinarySystem.app / Contents / Main.dxr / Internal_147_Save to List script.ls < prev    next >
Encoding:
Text File  |  2005-01-18  |  1.4 KB  |  47 lines

  1. property OFFstate, ONstate, NormalState, outcurs, incurs, incursSet, customImage, useCustom, customMask, oldcursor, pCurrentImage
  2. global gImageDescription, gListObject
  3.  
  4. on translate_cursor me, Setting, image, mask, Custom
  5.   val = [member(image), member(mask)]
  6.   return val
  7.   return Setting
  8. end
  9.  
  10. on beginSprite me
  11.   oldcursor = member("point")
  12.   val = translate_cursor(me, me.incursSet, "point", "point mask", 1)
  13.   set the cursor of sprite the spriteNum of me to val
  14.   memref = the member of sprite the currentSpriteNum
  15.   castLibNum = memref.castLibNum
  16.   NormalState = member(member(memref).memberNum, castLibNum)
  17.   DownState = member(member(memref).memberNum + 1, castLibNum)
  18.   OFFstate = member(member(memref).memberNum, castLibNum)
  19.   ONstate = member(member(memref).memberNum + 1, castLibNum)
  20. end
  21.  
  22. on endSprite me
  23.   oldcursor = member("point")
  24. end
  25.  
  26. on mouseUp me
  27.   if the member of sprite me.spriteNum = me.ONstate then
  28.     set the member of sprite the spriteNum of me to me.OFFstate
  29.     if the mouseH > 100 then
  30.       Option = #update
  31.     else
  32.       Option = #add
  33.     end if
  34.     gImageDescription = member("description").text
  35.     SaveImageToList(Option)
  36.   else
  37.     if value(gListObject).pCurrentImage = EMPTY then
  38.       exit
  39.     end if
  40.     set the member of sprite the spriteNum of me to me.ONstate
  41.   end if
  42. end
  43.  
  44. on mouseUpOutSide me
  45.   set the member of sprite the spriteNum of me to me.OFFstate
  46. end
  47.